<!DOCTYPE html>
<html><head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
	<title>拍品发布</title>
    <style type="text/css">
        * {
            outline: none;
            -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
            vertical-align: baseline;
            font-style: normal;
        }

        body {
            margin: 0;
            padding: 0;
            font-size: 12px;
            font-family: Microsoft Yahei, Arial, Simsun, Helvetica, Segoe UI, sans-serif;
            color: #404040;
            background-color: #efeff4;
        }

        img {
            border: 0
        }

        ul, ol, li, dt, dl, dd {
            text-decoration: none;
            list-style: none;
            vertical-align: middle;
            margin: 0;
            padding: 0;
        }

        a {
            color: #373737;
            text-decoration: none;
        }

        .topBanner {
            width: 100%;
            background-color: #fafafa;
            border-bottom: 1px solid #bfbfbf;
            display: table;
        }

        .topBanner .btn {
            float: right;
            padding: 13px 14px 13px 14px;
            color: #13ae24;
            width: 30%;
            text-shadow: 0px 0px 0px #fff;
            text-align: right;
            font-size: 16px;
            line-height: 16px;
        }

		.deal::-webkit-textfield-decoration-container {
		border:#fff 1px solid;background:#fff;
		}
		.deal::-webkit-inner-spin-button {
		     -webkit-appearance: none;
		}
		.deal::-webkit-outer-spin-button {
		     -webkit-appearance: none;	/* 有无看不出差别 */
		}
        .topBanner .moreSetCancel,
        .topBanner .draft {
            float: left;
            text-align: left;
            color: #8c8c8c;
            font-size: 15px;
        }

        .editMain {
            width: 94%;
            margin: 0 3%;
        }

        .editMain .desc {
            margin: 0 10px;
        }

        .editMain .desc textarea {
            border: none;
            outline: none;
            width: 100%;
            -webkit-box-sizing: border-box;
            padding: 4px 4px;
            height: 120px;
            margin-top: 12px;
            font-size: 15px;
            border-radius: 2px;
            color: #373737;
        }

        .editMain .goodsImgList {
            clear: both;
            margin: 10px 10px 4px 10px;
            display: table;
        }

        .editMain .goodsImgList div {
            position: relative;
            float: left;
            width: 80px;
            margin-right: 2px;
            margin-left: 4px;
            height: 80px;
            display: block;
            margin-bottom: 6px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: cover;
            border-radius: 2px;
        }

        .editMain .goodsImgList div.img .delete {
            position: absolute;
            width: 20px;
            height: 20px;
            right: 3px;
            top: 3px;
            margin: 0;
            padding: 0;
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/delete.png);
            background-size: 100%;
        }

        .editMain .goodsImgList div.addImg {
            background: url(<?php echo TEMPLATE_SITE_URL;?>/images/addimg.png) no-repeat;
            background-size: 80px;
        }

        .editMain .saleItem {
            background: #FFF;
            height: 48px;
            line-height: 48px;
            font-size: 14px;
            margin: 0 4%;
            display: table;
            width: 92%;
            border-bottom: 1px solid #F5F5F5;
        }

        .editMain .saleItem:last-child {
            border-bottom: none;
        }

        .editMain .saleItem.endTime,
        .editMain .saleItem.openTime {
            background-position: 100% center;
            background-size: auto 60%;
            background-repeat: no-repeat;
        }

        .editMain .saleItem.category {
            width: 92%;
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/categoryIcon.png);
            background-size: auto 60%;
            background-position: 100% center;
            background-repeat: no-repeat;
        }

        .editMain .saleItem.bzj {
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/shield.png);
            background-position: 100% center;
            background-size: auto 60%;
            background-repeat: no-repeat;
            position: relative;
        }

        .editMain .saleItem.bzj.disable {
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/shieldDisable.png);
        }

        .editMain .saleItem.bzj.disable:after {
            content: '点击开通';
            color: #a8a8a8;
            position: absolute;
            right: 45px;
            font-size: 14px;
            line-height: 48px;
        }

        .editMain .saleItem.disable .bidBzjInput span {
            color: #a8a8a8;
        }

        .editMain .saleItem.bzj .bidBzjList {
            position: absolute;
            left: -4%;
            top: 48px;
            width: 108%;
            background-color: #FFF;
            height: 0px;
            overflow: hidden;
        }

        .editMain .saleItem.bzj .bidBzjList div.bzjItem {
            float: left;
            display: block;
            width: 33%;
            height: 45px;
            line-height: 45px;
            color: #6388d4;
            font-size: 15px;
            text-align: center;
        }

        .editMain .saleItem.bzj .bidBzjList div.disable {
            color: #a8a8a8;
        }

        .editMain .saleItem .lihead {
            line-height: 48px;
            font-size: 16px;
            color: #000;
            font-weight: 500;
            float: left;
            width: 90px;
        }

        .editMain .saleItem .endTimeInput,
        .editMain .saleItem .openTimeInput,
        .editMain .saleItem .category {
            float: left;
        }

        .editMain .saleItem .endTimeInput span,
        .editMain .saleItem .openTimeInput span,
        .editMain .saleItem .category {
            line-height: 48px;
            font-size: 16px;
            color: #6388d4;
            margin: 0 10px;
        }

        .editMain .saleItem .endTimeInput .endTimeList,
        .editMain .saleItem .openTimeInput .openTimeList {
            position: absolute;
            left: 0px;
            top: 0px;
            bottom: 0px;
            z-index: 9999;
            background: #FFF;
            display: none;
            width: 100%
        }

        .editMain .saleItem .endTimeInput .endTimeList dl,
        .editMain .saleItem .openTimeInput .openTimeList dl {
            margin-left: 7px;
        }

        .editMain .saleItem .endTimeInput .endTimeList dl:last-child dt,
        .editMain .saleItem .openTimeInput .openTimeList dl:last-child dt {
            border-top: 1px dashed #ccc;
        }

        .editMain .saleItem .endTimeInput .endTimeList dl:first-child dt,
        .editMain .saleItem .openTimeInput .openTimeList dl:first-child dt {
            border-top: none;
        }

        .editMain .saleItem .endTimeInput .endTimeList dl dt,
        .editMain .saleItem .openTimeInput .openTimeList dl dt {
            width: 100%;
            clear: both;
            color: #6388d4;
            font-size: 15px;
        }

        .editMain .saleItem .endTimeInput .endTimeList dl dd,
        .editMain .saleItem .openTimeInput .openTimeList dl dd {
            position: relative;
            float: left;
            width: 28%;
            border: 1px solid #ccc;
            border-radius: 2px;
            text-align: center;
            line-height: 40px;
            height: 40px;
            margin: 0px 5px 10px 8px;
        }

        .editMain .saleItem .endTimeInput .endTimeList dl dd div{
            position: absolute;
            bottom: 2px;
            right: 2px;
            line-height: 10px;
            font-size: 10px;
            color: #a8a8a8;
        }

        .editMain .saleItem .numInput,
        .editMain .saleItem .bidBzjInput {
            float: left;
            font-family: "Helvetica neue", Verdana, Geneva, sans-serif;
            height: 48px;
            line-height: 48px;
        }

        .editMain .saleItem .numInput span,
        .editMain .saleItem .bidBzjInput span,
        .editMain .saleItem .categoryInput span {
            line-height: 48px;
            font-size: 16px;
            color: #6388d4;
            margin: 0 10px;
        }

        .editMain .saleItem .numInput span.hover {
            border-right: 2px solid red;
        }

 		.editMain .switchBtn
        {
            float: right;
            text-indent: -9999px;
            display: block;
            width: 50px;
            overflow: hidden;
            height: 30px;
            background: transparent url(<?php echo TEMPLATE_SITE_URL;?>/images/switchButton.png) no-repeat;
            -webkit-transition: background-position 0.2s ease-in-out;
            cursor: pointer;
            margin: 8px 0;
            background-position: -20px 0px;
            background-size: 50px;
            border-radius: 16px;
        }
        

        .editMain .switchBtn.on {
            background-position: 0px 0px;
        }

        .editMain .tip {
            color: #8c8c8c;
            margin: 0px 15px;
            line-height: 30px;
            font-size: 12px;
        }

        .editMain #moreSetTip {
            margin: 5px 15px 12px 15px;
            line-height: 17px;
            text-align: right;
        }

        .editMain .saleItem .moreSet {
            width: 92%;
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/gray_right_arrow.png);
            background-position: 98% center;
            background-size: 15px;
            background-repeat: no-repeat;
        }

        .editMain .saleItem .moreSet {
            width: 100%;
        }

        .editMain .saleItem .moreList {
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: #F0EFF5;
            right: -100%;
            top: 0;
            display: none;
        }

        .editMain .saleItem .moreList .topBanner {
            margin-bottom: 12px;
        }

        .wptLoading .wptMask {
            opacity: 0.4;
        }

        .wptLoading .loading .process {
            position: absolute;
            width: 100%;
            height: 20px;
            bottom: 5px;
            color: #FFF;
            line-height: 20px;
            font-size: 12px;
            text-align: center;
            text-indent: 0px;
        }
    </style>
    <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto0.8.2.0.js"></script>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?v=0.8.2.0"></script>	

</head>

<body> <div style="margin-top:20px;"><?php if(isset($output['zc_times'])){$zc_times_str_start=date("Y-m-d H:m:s",$output["zc_times"]["start_time"]);$zc_times_str_end=date("Y-m-d H:m:s",$output["zc_times"]["end_time"]);	echo "<input type='hidden' id='zc_is_time' value='1' />";	echo "<input type='hidden' id='zc_start_time' value='".$output["zc_times"]["start_time"]."' />";	echo "<input type='hidden' id='zc_end_time' value='".$output["zc_times"]["end_time"]."' />";	echo "<input type='hidden' value='".$output['time']."' id='current_time_c'>";	echo "<input type='hidden' value='".$output['time_str']."' id='current_time_s'>";	echo "<input type='hidden' value='".$zc_times_str_start."' />";	echo "<input type='hidden' value='".$zc_times_str_end."' />";}else{	echo "<input type='hidden' id='zc_is_time' value='0' />";}	?><input type="hidden" id="zc_id" value="<?php echo $output['zc_id'];?>" /></div><style type="text/css">
        .editMain {
            width: 100%;
            margin: 12px 0 0 0;
            display: table;
        }

        .setBox {
            background-color: #FFF;
            width: 100%;
            display: table;
        }

        .optionalTitle {
            width: 92%;
            padding: 12px 4%;
            color: #8c8c8c;
        }

        .moreSetBox {
            margin-top: 12px;
        }

        .wptCategory {
            display: none;
        }

        .wptCategory .categoryBox {
            position: fixed;
            background: #ededed;
            bottom: -356px;
            width: 100%;
            z-index: 1999;
        }

        .wptCategory .categoryBox .categoryTitle {
            display: table;
            width: 100%;
            height: 50px;
            line-height: 50px;
        }

        .wptCategory .categoryBox .categoryTitle .title {
            float: left;
            font-size: 16px;
            color: #8c8c8c;
            margin-left: 4%;
        }

        .wptCategory .categoryBox .categoryTitle .title label {
            font-size: 12px;
            margin-left: 10px;
        }

        .wptCategory .categoryBox .categoryTitle .finish {
            float: right;
            font-size: 16px;
            color: #13ae24;
            width: 50px;
            height: 50px;
            padding: 0 4%;
            text-align: center;
        }

        .wptCategory .categoryBox .categoryList .categoryItem {
            display: table;
            width: 100%;
            background-color: #FFF;
            height: 50px;
            line-height: 50px;
            font-size: 14px;
            border-bottom: 1px solid #f5f5f5;
        }

        .wptCategory .categoryBox .categoryList .categoryItem div:first-child {
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/categoryListIcon.png?t=2);
            background-repeat: no-repeat;
            background-size: 50px;
            float: left;
            text-indent: 36px;
            margin-left: 4%;
            width: 80%;
            height: 50px;
            overflow: hidden;
        }

        .wptCategory .categoryBox .categoryList .categoryItem.selected div:first-child {
            background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/categoryListIconSelected.png?t=2);
        }

        .wptCategory .categoryBox .categoryList .categoryItem div.category1 {
            background-position: -12px 0px;
        }

        .wptCategory .categoryBox .categoryList .categoryItem div.category2 {
            background-position: -12px -50px;
        }

        .wptCategory .categoryBox .categoryList .categoryItem div.category3 {
            background-position: -12px -100px;
        }

        .wptCategory .categoryBox .categoryList .categoryItem div.category4 {
            background-position: -12px -150px;
        }

        .wptCategory .categoryBox .categoryList .categoryItem div.category5 {
            background-position: -12px -200px;
        }

        .wptCategory .categoryBox .categoryList .categoryItem div.category0 {
            background-position: -12px -250px;
        }

		.wptCategory .categoryBox .categoryList .categoryItem div.category6 {
		            background-position: -12px -250px;
		        }
		.wptCategory .categoryBox .categoryList .categoryItem div.category7 {
		            background-position: -12px -300px;
		        }        
        
 		.wptCategory .categoryBox .categoryList .categoryItem div:last-child {
            float: right;
            width: 21px;
            height: 21px;
            margin: 14px 3% 14px 0px;
            background: url(<?php echo TEMPLATE_SITE_URL;?>/images/gray_right_arrow.png) center center no-repeat;
            background-size: 70% auto;
        }


        .wptCategory .categoryBox .categoryList .categoryItem div span {
            margin-left: 8px;
            font-size: 10px;
            color: #939393;
        }

        .wptCategory .wptMask {
            opacity: 0.4 !important;
        }
        	
 
 		#pop2 {
			background: rgba(0, 0, 0, 0.2) none repeat scroll 0 0;
			position: fixed;
			text-align: right;
			width:100%;
			z-index: 2000;
		}
		.secondsort {width:100%;height:400px;text-align:left;position:fixed;bottom:0px;background:#fff;z-index:2000;}
		.sTitle {height:40px;line-height:40px;padding:0px 15px;background:#ededed;}
		.sTitleLeft {width:30%;height:45px;float:left;}
		.sTitleLeft a {color:#8b8b8b;}
		.sTitleMid {width:40%;height:45px;text-align:center;font-size:1.2em;float:left;}
		.sTitleRight {width:30%;height:45px;text-align:right;float:left;}
		.sTitleRight a {color:#3ec10b;}
		.sContent p {color:#888;padding-left:15px;}
		.sContentSort a {color:#666;width:20%;height:27px;line-height:27px;margin-top:5px;margin-bottom:8px;text-align:center;border:#666 1px solid;border-radius:4px;margin-left:4%;float:left;}
		.sContentSort .on {color:#fff;background:#3ec10b;border:#3ec10b 1px solid;}
    </style>    <div id="contentbox" style="">        <div class="topBanner">            <div class="next btn">发&nbsp;&nbsp;布</div>        </div>        <div class="editMain">            <form action="/auction/sale_publish/2165556" method="post" id="publishForm">                <input type="hidden" name="refer" value="">                <div class="setBox">                    <div class="saleItem endTime" id="time_ios">										<?php 					if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){echo '<div class="lihead" style="width:100%;">截止时间：<input type="datetime-local" class="sang_Calender" id="jz_date"/></div>';}					elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){echo '<div class="lihead" style="width:100%;">截止时间：<input type="text" class="sang_Calender" id="jz_date"/></div><script type="text/javascript" src="/datetime.js"></script>';}					else{echo '<div class="lihead" style="width:100%;">截止时间：<input type="text" class="sang_Calender" id="jz_date"/></div><script type="text/javascript" src="/datetime.js"></script>';}					?>                    </div>										                    <div class="saleItem category">                        <div class="lihead">分类</div>                        <div class="categoryInput"><span id="classification"><?php if(!empty($output['category0'])&&!empty($output['category1'])){ echo $output['category0']['categoryname'].'&nbsp;'.$output['category1']['categoryname'];}else{ echo '请选择拍品分类';}?></span></div>						<input type="hidden" name="cate_id" value="<?php echo $output['category0']['id'];?>">						<input type="hidden" name="categoryname" value="<?php echo $output['category0']['categoryname'];?>">                    	<input type="hidden" name="cate_id_1" value="<?php echo $output['category1']['id'];?>">                    	<input type="hidden" name="categoryname1" value="<?php echo $output['category1']['categoryname'];?>">                    </div>                    <div class="saleItem">                        <div class="lihead" desc="起拍价(元)">起拍价</div>                        <div class="numInput" id="bidMoney"><input type="number"  class="deal" name="firstprice" style="border:0;" value="<?php if(!empty($output['auction']['firstprice'])){ echo $output['auction']['firstprice'];}else{ echo '0';}?>"></div>                    </div>                    <div class="saleItem">                        <div class="lihead" desc="每次加价的最小金额(元)">加价幅度</div>                        <div class="numInput" id="increase"><input type="number" class="deal" name="addprice" style="border:0;" value="<?php if(!empty($output['auction']['addprice'])){ echo $output['auction']['addprice'];}else{ echo '100';}?>"></div>                    </div>                </div>                <div class="optionalTitle">可选设置</div>                <div class="setBox">                    <div class="saleItem">                        <div class="lihead">包邮</div>                        <div class="switchBtn expressFee <?php if($output['auction']['freeship']=='1'){ echo 'on';}?>"></div>                        <input type="hidden" id="freeship" name="freeship" value="<?php if($output['auction']['freeship']=='1'){ echo '1';}else{ echo '2';}?>">                    </div>                    <div class="saleItem bzj">                        <div class="lihead" desc="可为0元,设定后,卖家和买家都须缴纳">保证金</div>                        <div class="bidBzjInput" id="bidBzj">                            <span><?php if(!empty($output['auction']['cashprice'])){ echo $output['auction']['cashprice'];}else{ echo '0';}?></span>                            <div class="bidBzjList">                                <div class="bzjItem">0</div>                                <div class="bzjItem">2</div>                                <div class="bzjItem">10</div>                                <div class="bzjItem">30</div>                                <div class="bzjItem">50</div>                                <div class="bzjItem">100</div>                                <div class="bzjItem">200</div>                                <div class="bzjItem">500</div>                                <div class="bzjItem">1000</div>                            </div>                        </div>                        <input type="hidden" name="bidBzj" value="<?php if(!empty($output['auction']['cashprice'])){ echo $output['auction']['cashprice'];}else{ echo '0';}?>">                    </div>                </div>                <div class="setBox moreSetBox">                    <div class="saleItem">                        <div class="lihead moreSet">更多高级设置</div>                        <div class="moreList">                            <div class="topBanner">                                <div class="moreSetCancel btn">取&nbsp;&nbsp;消</div>                                <div class="moreSetOver btn">下一步</div>                            </div>                            <div class="setBox">                                <div class="saleItem fixedPrice">                                    <div class="lihead" desc="一口价(元)">一口价</div>                                    <div class="numInput" id="fixedPrice">                                    	<input type="number" style="color:#777;border:#fff 1px solid;" id="yikoujia" name="yikoujia" value="<?php if(!empty($output['auction']['yikoujia'])){ echo $output['auction']['yikoujia'];}else{ echo '0';}?>" class="deal">                                    </div>								                                </div>                            </div>                            <div class="tip">                                出价达到或超过此价格立即成交（无一口价请设0元）                            </div>                            <div class="setBox">                                <div class="saleItem referencePrice">                                    <div class="lihead" desc="参考价(元)">参考价</div>                                    <div class="numInput" id="referencePrice">                                    	<input type="number" style="color:#777;border:#fff 1px solid;" id="cankaojia" name="cankaojia" value="<?php if(!empty($output['auction']['yikoujia'])){ echo $output['auction']['cankaojia'];}else{ echo '0';}?>" class="deal">                                    </div>                                </div>                            </div>                            <div class="tip">                                提供此拍品的参考价格（无参考价请设0元）                            </div>                        </div>                    </div>                </div>                <div class="tip" id="moreSetTip">                	<?php if($output['auction']['yikoujia']){?>                	一口价：￥<?php echo $output['auction']['yikoujia'];?>元<br />                	<?php }?>                	<?php if($output['auction']['yikoujia']){?>                	参考价：￥<?php echo $output['auction']['cankaojia'];?>元<br />                	<?php }?>                </div>                <?php if($output['is_charge']>0){?>				<div class="tip" style="color:red;">平台设置了<?php echo $output['is_charge'];?>%佣金，拍品将在买家确认收货之后，扣除相应的佣金</div>                <?php }?>            </form>        </div>    </div>
    <script type="text/javascript">		var zc_up_is=0;
        var focusDiv = null;

        //判断包含关系
        function isContainsClass(child, parentClass) {
            while (child && !$(child).hasClass(parentClass)) {
                child = child.parentNode;
            }
            return ($(child).hasClass(parentClass));
        }

        function numInput() {
            $(".numInput span").removeClass("hover");
            focusDiv.find("span").addClass("hover");

            if (parseInt($.trim(focusDiv.find("span").text())) == 0) {
                focusDiv.find("span").html('#');
            }

            //触发数字键盘
            var desc = focusDiv.find(".lihead").attr("desc");
            $(document.body).trigger("fixednum_view:focus", focusDiv.find(".numInput"));
            $(document.body).trigger("fixednum_view:show", desc);
        }

        //收起高级设置
        function hideMoreSet() {
            document.title = '拍卖设置';
            $(document.body).trigger('fixednum_view:hide');
            $('body').css({"overflow": "hidden"});
            $('.moreList').animate({"right": "-100%"}, 150, function () {
                $('.moreList').hide();
                $('body').css({"overflow": "initial"});
            });
        }

        //包邮
        function expressFee(self, freePost) {
            var post = 'otherPost';
            if (freePost == true) {
                self.addClass('on');
                post = 'freePost';
            } else {
                if (self.hasClass('on')) {
                    self.removeClass('on');
                } else {
                    self.addClass('on');
                    post = 'freePost';
                }
            }
            $('#expressFee').val(post);
        };

        //分类
        function wptCategory() {
            maskIsHide = false;

            var category = parseInt($('#category').val());
            category = isNaN(category) ? 0 : category;
            $('.wptCategory .categoryItem').removeClass("selected");
            $('.wptCategory .categoryItem[data-id="'+ category +'"]').addClass("selected");
            $(".wptCategory").show();

            var categoryBox = $(".wptCategory .categoryBox");
            $(".wptCategory .wptMask").animate({opacity: "0.4"}, 100);
            categoryBox.animate({bottom: "0px"}, 100);

            pushStateEvent("wptCategory_view:hide");
            $(document).off("wptCategory_view:hide").one("wptCategory_view:hide", function (e) {
                maskIsHide = true;
                $(".wptCategory .wptMask").animate({opacity: "0"}, 100);
                var bottom = '-' + categoryBox.height() + 'px';
                categoryBox.animate({bottom: bottom}, 100, function () {
                    $(".wptCategory").hide();
                });
            });

            $('.wptCategory .categoryTitle, .wptCategory .wptMask').off('touchend').one('touchend', function (e) {
                e.preventDefault();
                if ($(e.target).hasClass('finish')) {
                    var selectedCategory = $('.wptCategory .categoryItem').filter('.selected');
                    if (selectedCategory.length == 0) {
                        $('#category').val(0);
                        $('.categoryInput span').text('文玩杂项');
                    } else {
                        $('#category').val(selectedCategory.data('id'));
                        $('.categoryInput span').text($.trim(selectedCategory.data("title")));
                    }
                }
                if ($.os.android && ignorePhoneModel.indexOf(getPhoneModel()) == -1) {
                    history.back();
                }else{
                    $(document.body).trigger("wptCategory_view:hide");
                }
            });

            $('.finish').click(function(){
            	var selectedCategory = $('.wptCategory .categoryItem').filter('.selected');

                $('#category').val(selectedCategory.data('id'));
                $('.categoryInput span').text($.trim(selectedCategory.data("title")));
            	$(document.body).trigger("wptCategory_view:hide");
            });
        }


        
        $(function () {
            focusDiv = $("#bidMoney");

            $(document).on('click', function (e) {
                e.preventDefault();
                if (!isContainsClass(e.target, 'saleItem') && !isContainsClass(e.target, 'numkey')) {
                    $(".numInput span").removeClass("hover");
                }
                if (!isContainsClass(e.target, 'numkey')) {
                    $(".numInput span").each(function (i, n) {
                        var text = $.trim($(n).text());
                        if (text == '') {
                            $(n).html('0');
                        } else if (text == '#') {
                            $(n).html('');
                        }
                    });
                }

                if (!isContainsClass(e.target, 'bidBzjInput')) {
                    $(document.body).trigger("bidBzjList_view:hide");
                }
            });


            //保证金选择
            var bidBzjList = $(".bidBzjList");
            $(document).off('bidBzjList_view:show').on('bidBzjList_view:show', function (e) {
                e.preventDefault();
                $(".saleItem.bzj").removeClass("disable");
                if (bidBzjList.height() == 0) {
                    bidBzjList.show();
                    bidBzjList.animate({"height": "135px"}, 150, function(){});
                }
            });

            $(document).off('bidBzjList_view:hide').on('bidBzjList_view:hide', function (e) {
                e.preventDefault();
                if (bidBzjList.height() > 0) {
                    bidBzjList.css("height", "0px");
                    bidBzjList.hide();
                }
            });

            $(".bidBzjInput").parent().on('click', function (e) {
                e.preventDefault();
                var self = $(this);
                $(document.body).trigger("fixednum_view:hide");

                if ($(this).hasClass("disable")) {
                    $(document).off('wptConfirm_view:sure').one('wptConfirm_view:sure', function () {
                        self.removeClass("disable");
                        $(document.body).trigger("bidBzjList_view:show");
                    });
                    wptConfirm('买卖双方都缴纳保证金,如一方发生违约,将赔付给对方', {text: '同意', msgClass: 'faq'});
                } else {
                    $(document.body).trigger("bidBzjList_view:show");
                }
            });

            $('.bidBzjInput .bzjItem').on('click', function (e) {
                e.preventDefault();
                e.stopPropagation();
                var self = $(this);
                if (!self.hasClass('disable')) {
                    var bzj = $.trim(self.text());
                    $("input[name='bidBzj']").val(bzj);
                    $(".bidBzjInput span").html(bzj);
                    $(document.body).trigger("bidBzjList_view:hide");
                }
            });

            //其他选择项
            $(".numInput").parent().on("click", function () {
                focusDiv = $(this);
                numInput();
            });

            $('.moreSet').on('click', function (e) {
                e.preventDefault();
                document.title = '拍卖高级设置';
                $(document.body).trigger('fixednum_view:hide');

                $(".numInput span").removeClass("hover");
                $('body').css({"overflow": "hidden"});
                setTimeout(function () {
                    $('.moreList').show().animate({"right": 0}, 150, function () {
                        $('body').css({"overflow": "initial"}).scrollTop(0);
                    });
                }, 0);
            });

            $('.moreSetCancel').on('click', function (e) {
                e.preventDefault();
                $("#fixedPrice span").html($("input[name='fixedPrice']").val());
                hideMoreSet();
            });

            $('.moreSetOver').on('click', function (e) {

				var yikoujia = parseInt($('input[name=yikoujia]').val());
				var cankaojia = parseInt($('input[name=cankaojia]').val());

                var html = '';
                //一口价
                if (yikoujia > 0) {
                    html += '一口价：￥' + yikoujia + '元<br />';
                } 				else if (yikoujia < 0) {
                    alert("无一口价请设0元!");
                    return;
                }
                //参考价
                if (cankaojia > 0) {
                    html += '参考价：￥' + cankaojia + '元<br />';
                } else if (cankaojia < 0) {
                	alert("无参考价请设0元!");
                    return;
                }
				$('.moreList').hide();
                $('#moreSetTip').html(html);

            });

            //分类选择
            $('.categoryItem').on('click', function (e) {
            	var id = $(this).attr('data-id');
            	var title = $(this).attr('data-title');
            	
            	$('.categoryItem').removeClass('selected');
            	$(this).addClass('selected');
            });

            $('.saleItem.category').on('click', function (e) {
                //e.preventDefault();
                //$(document.body).trigger('fixednum_view:hide');
                //$(".numInput span").removeClass("hover");
                wptCategory();
            });

			$('.expressFee').click(function(){
				if($(this).hasClass('on')){
					$(this).removeClass('on');
					$(this).addClass('off');
					$('#freeship').val('2');
				}else{
					$(this).removeClass('off');
					$(this).addClass('on');
					$('#freeship').val('1');
				}
			});

    
//提交
            $(".next").on("click", function () {							var zc_id=$('#zc_id').val();
                var cate_id = parseInt($("input[name='cate_id']").val());
                var cate_id_1 = parseInt($("input[name='cate_id_1']").val());
                var firstprice = parseInt($("input[name='firstprice']").val());
                var bidBzj = parseInt($("input[name='bidBzj']").val());
                var addprice = parseInt($("input[name='addprice']").val());
                var freeship = $('#freeship').val();
                var cankaojia = parseInt($('#cankaojia').val());
                var yikoujia = parseInt($('#yikoujia').val());
				var auction_id = <?php echo intval($_GET['auction_id'])?>;
				var auction_video_url='<?php echo $_GET['auction_video_url']?>';if(firstprice>100000){	alert('起拍价不可大于100000');	return;}if(addprice>100000){	alert('加价幅度不可大于100000');	return;}				var jz_date=$("#jz_date").val();				if(jz_date==""){					alert("请选择截止时间！！");					return;				}				var u = navigator.userAgent;				var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;				if(isAndroid){}				else{jz_date=jz_date.replace("T"," ");var str_index=jz_date.indexOf(".");if(str_index>-1){jz_date=jz_date.substring(0,str_index);}					}													                var endTime_str =jz_date;								var endTime=new Date(endTime_str).getTime()/1000;				var endTime_iso=endTime_str.split(/[- :]/);								var u = navigator.userAgent;				var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;				if(isAndroid){					endTime=new Date(endTime_str).getTime()/1000;				}				else{					endTime=new Date(endTime_iso[0],endTime_iso[1]-1,endTime_iso[2],endTime_iso[3],endTime_iso[4],endTime_iso[5]).getTime()/1000;				}				var zc_is_time=$('#zc_is_time').val();				var zc_start_time=0;				var zc_end_time=0;				if(zc_is_time==1){											zc_start_time=$('#zc_start_time').val();						zc_end_time=$('#zc_end_time').val();												var zc_end_time_int=parseInt(zc_end_time)*1000;						var zc_end_time_obj=new Date(zc_end_time_int);												var y=zc_end_time_obj.getFullYear();						var m=zc_end_time_obj.getMonth()+1;						var xy_date=zc_end_time_obj.getDate();						var hour=zc_end_time_obj.getHours();						var minute=zc_end_time_obj.getMinutes();												var zc_start_time_int=parseInt(zc_start_time)*1000;												var zc_start_time_obj=new Date(zc_start_time_int);						var start_y=zc_start_time_obj.getFullYear();						var start_m=zc_start_time_obj.getMonth()+1;						var start_xy_date=zc_start_time_obj.getDate();						var start_hour=zc_start_time_obj.getHours();						var start_minute=zc_start_time_obj.getMinutes();						var current_time_c=$("#current_time_c").val();						if(zc_start_time>=zc_end_time){						alert("专场异常！!");						return;						}						else if(current_time_c>zc_start_time && current_time_c<zc_end_time){							alert("专场正在进行中！！！");						}						else if(current_time_c>zc_end_time){							alert("专场已经结束！！！");						}						else if(endTime>zc_end_time){							alert("你选择的截止时间："+endTime_str+"\r\n专场结束时间："+y+"-"+m+"-"+xy_date+" "+hour+":"+minute+"\r\n您选择的截止时间大于专场结束时间！！！");							return;						}						else if(endTime<zc_start_time){							alert("你选择的截止时间："+endTime_str+"\r\n专场开始时间："+start_y+"-"+start_m+"-"+start_xy_date+" "+start_hour+":"+start_minute+"\r\n您选择的截止时间小于专场开始时间！！！");							return;						}												var current_time=Date.now()/1000;						if(endTime<=current_time){							alert("你选择的截止时间小于或等于当前时间！！！");							return;						}								}																							
				var  is_classification=$('#classification').html();				if(is_classification=="请选择拍品分类"){alert("请选择拍品分类");return;}				else{alert("分类已经选择，即将发布。。。。");}			
                if(cate_id_1=='') {
                    alert("请选择拍品分类！");
                    return;
                }

                if (endTime > 0) {
                    var nowTime = Date.now();
                    if (endTime < nowTime / 1000) {
                        alert("截止时间不能小于当前时间!");
                        return;
                    }
                }

                if (firstprice < 0) {
                    alert("最低起拍价 0 元!");
                    return;
                }

                if (isNaN(addprice) || addprice <= 0) {
                    alert("最低加价幅度 1 元!");
                    return;
                }

                if (yikoujia > 0 && yikoujia < firstprice) {
                    alert("一口价必须大于起拍价!");
                    return;
                }

                if (yikoujia > 0 && yikoujia < addprice) {
                	alert("加价幅度不能大于一口价!");
                    return;
                }				if(yikoujia>100000){					alert("一口价不能大于100000！");					return;				}

				if(zc_up_is==1){					alert("您已经发布过了该专场拍品！！！");					return false;				}				
				$.ajax({
					type:'post',					async:false,
					url:'index.php?act=publish&op=publishAuction',
					data:{						auction_id:auction_id,						end_time:endTime,						cate_id:cate_id,						cate_id_1:cate_id_1,						firstprice:firstprice,						cashprice:bidBzj,						addprice:addprice,						freeship:freeship,						cankaojia:cankaojia,						yikoujia:yikoujia,						auction_video_url:auction_video_url,						zc_is_time:zc_is_time,						zc_start_time:zc_start_time,						zc_end_time:zc_end_time,						zc_id:zc_id						},
					dataType:'json',
					success:function(data){
						if(data.state=='1'){							if(zc_id>0){								zc_up_is=1;							alert("操作成功，等待专场管理员审核！！");							location.href = 'index.php?act=renzheng&op=zhuanchang_paipin&curpage=1';							}							else{								if(bidBzj>0){								location.href = 'index.php?act=index&op=auctionselleraddcash&auction_id='+auction_id;							}else{								location.href = 'index.php?act=index&auction_id='+auction_id;							}								}
													
						}
					}
				});				

            });
        });
    </script>



    <div class="wptCategory">
        <div class="wptMask"></div>
        <div class="categoryBox">
            <div class="categoryTitle">
                <span class="title">分 类<label>请谨慎选择，切勿跨品类</label></span>
            </div>
            <div class="categoryList">
            		<?php if(!empty($output['category'])){?>
            		<?php $i = 1;?>
            		<?php foreach($output['category'] as $category){?>
                    <div class="categoryItem" data-id="<?php echo $category['id']?>" data-title="<?php echo $category['categoryname'];?>">
                        <div class="category<?php echo $i;?>">
                            	<?php echo $category['categoryname'];?><span><?php echo $category['categorycontent'];?></span>
                        </div>
                        <div class="cate" data-category_id="<?php echo $i;?>" data-categoryname="<?php echo $category['categoryname'];?>"></div>
                    </div>
                    <?php $i++;?>
                    <?php }?>
					<?php }?>
            </div>
        </div>
        
        <div id="pop2">
       	 <?php if(!empty($output['category'])){?>
       	 <?php $j = 1;?>
       	 <?php foreach($output['category'] as $category1){?>
         <div class="secondsort son<?php echo $j;?>" style="display:none;" >
            <div class="sTitle">
               <div class="sTitleLeft"><a class="chongxuan" href="javascript:;">重选</a></div>
               <div class="sTitleMid"><?php echo $category1['categoryname']?></div>
               <div class="sTitleRight"><a class="finishcategory">完成</a></div>
            </div>
            <div class="sContent">
               <p>请选择二级分类</p>
               <div class="sContentSort">
               	  <?php if(!empty($category1['son'])){?>
               	  <?php foreach($category1['son'] as $son){?>
                  <a href="javascript:;" class="soncategory" data-categroy_id="<?php echo $son['id'];?>" data-categoryname="<?php echo $son['categoryname'];?>"><?php echo $son['categoryname']?></a>
                  <?php }?>
                  <?php }?>
               </div>
            </div>
         </div>
         <?php $j++;?>
         <?php }?>
         <?php }?>
        </div>
    </div>

        
        <script type="text/javascript">
			$(function(){

				$('.finishcategory').click(function(){
					
					var categoryname = $("input[name='categoryname']").val();
					var categoryname1 = $("input[name='categoryname1']").val();

					if(categoryname=='' || categoryname1==''){
						alert('请选择分类');
						return false;
					}
					
					$('.categoryInput span').html(categoryname+'&nbsp;'+categoryname1);					
					$('.wptCategory').hide();

				});
				
				$('.soncategory').click(function(){
					$('.soncategory').removeClass('on');
					$(this).addClass('on');

					$("input[name='cate_id_1']").val($(this).data('categroy_id'));
					$("input[name='categoryname1']").val($(this).data('categoryname'));
					
				});
				
				$('.chongxuan').click(function(){
					$("input[name='cate_id_1']").val('');
					$("input[name='categoryname1']").val('');
					
					$('.soncategory').removeClass('on');
					$('.secondsort').hide();					
				});
				
				$('.cate').click(function(){
					var cate_id = $(this).data("category_id");
					$('.secondsort').hide();
					$('.son'+cate_id).show();

					$("input[name='cate_id']").val(cate_id);
					$("input[name='categoryname']").val($(this).data('categoryname'));
				});
			});
        </script>
<style type="text/css">
    .supportBanner {
        width: 100%;
        text-align: center;
        height: 49px;
        line-height: 49px;
        font-size: 12px;
        border-top: 1px solid #eaeae8;
        background-color: #F8F8F8;
        margin-top: 10px;
        color: #888;
        visibility: hidden;
    }
    
    .supportBanner a {
        color: #F2B896
    }
</style>
<script type="text/javascript">
    function fixSupport() {
        if ($.os.android) {
            bodyWidth = document.body.clientWidth;
            bodyHeight = document.documentElement.clientHeight;
        } else {
            bodyWidth = $(window).width();
            bodyHeight = $(window).height();
        }
        var dHeight = document.documentElement.offsetHeight;
        if (dHeight < bodyHeight) {
            $('#contentbox').css('minHeight', bodyHeight - 60 - 0);
        }
        $(".supportBanner").css("visibility", "visible");
    }
    $(function () {
        fixSupport();

        $(document).off("wptSupport_view:fix").on("wptSupport_view:fix", function () {
            fixSupport();
        });
    });
</script>

<style type="text/css">
    .fixednumMask {
        position: fixed;
        width: 100%;
        opacity: 0;
        top: 0px;
        bottom: 0px;
        background-color: #000;
        display: none;
        z-index: 999;
    }

    .fixednumMain {
        position: fixed;
        bottom: -410px;
        left: 0px;
        z-index: 1199;
        background: #F0F0F0;
        width: 100%;
        display: none;
    }

    .fixednumMain .tipBanner {
        height: 42px;
        width: 100%;
        background: #F0F0F0;
        border-top: 1px solid #cacaca;
        font-size: 16px;
    }

    .fixednumMain .tipBanner span.title,
    .fixednumMain .priceBanner span.title {
        line-height: 42px;
        float: left;
        text-indent: 10px;
        min-width: 65px
    }

    .fixednumMain .tipBanner .last,
    .fixednumMain .priceBanner .editTxt {
        float: left;
        width: 60%;
        height: 30px;
        line-height: 30px;
        margin: 6px 0;
        color: #7596D9;
        text-indent: 4px;
        overflow: hidden;
        font-size: 20px;
        font-family: "Helvetica neue", Verdana, Geneva, sans-serif;
    }

    .fixednumMain .tipBanner .close {
        float: right;
        width: 42px;
        height: 42px;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/close.png);
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 28px;
    }

    .fixednumMain .tipBanner .finish{
        float:right;
        width:42px;
        height:42px;
        background-size:30px;
        line-height:40px;
        font-size:16px;
        color:#007aff;
    }

    .fixednumMain .priceBanner {
        background: #fff;
        height: 42px;
        line-height: 42px;
        font-size: 16px;
        width: 100%;
        position: relative;
    }

    .fixednumMain .priceBanner .editTxt .hover {
        border-right: 2px solid red;
    }

    .fixednumMain .priceBanner .tips {
        color: #999;
        font-size: 14px;
        margin-right: 10px;
        overflow: hidden;
        height: 42px;
        position: absolute;
        right: 0;
        top: 0
    }

    .fixednumMain .priceBanner .tips .clearPrice {
        width: 20px;
        height: 42px;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/clearPrice.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 16px;
    }
    
    .fixednumMain .btnBanner {
        margin: 0 auto;
        width: 96%;
        padding: 10px 0px;
        display: table;
    }

    .fixednumMain .btnBanner .confirmBtn,
    .fixednumMain .btnBanner .fixedPrice  {
        background: #06BE04;
        padding: 2.5% 0;
        border-radius: 4px;
        width: 66%;
        text-align: center;
        font-size: 18px;
        color: #fff;
        border: none;
        float: left;
        height: 24px;
        line-height: 24px;
    }

    .fixednumMain .btnBanner .fixedPrice {
        background: #01B7F0;
        width: 32%;
        float: left;
        margin-right: 2%;
        font-size: 14px;
        height: 24px;
        line-height: 24px;
    }

    .fixednumMain .btnBanner .confirmBtn:only-child{
        padding: 10px 0;
        width: 100%;
    }

    .fixednumMain .agreeBanner {
        margin: 0 auto;
        width: 96%;
        padding-bottom: 8px;
        font-size: 12px;
        text-align: right;
        color: #878787;
        display: table;
    }

    .fixednumMain .numkey {
        width: 100%;
        background: #fff;
        display: table;
    }

    .fixednumMain .numkey ul {
        padding: 0;
        margin: 0;
    }

    .fixednumMain .numkey ul,
    .fixednumMain .numkey li {
        text-decoration: none;
        list-style: none;
        vertical-align: middle;
    }

    .fixednumMain .numkey ul li {
        width: 33.1%;
        border-bottom: 1px solid #b3b3b3;
        border-right: 1px solid #b3b3b3;
        height: 50px;
        float: left;
        font-size: 28px;
        font-family: "Helvetica neue", Verdana, Geneva, sans-serif;
        text-align: center;
        background: #fff;
    }

    .fixednumMain .numkey ul li:nth-child(3n) {
        border-right: none;
    }

    .fixednumMain .numkey ul li.delete {
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/backspace.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 30px;
        background-color: #D1D5DA;
    }

    .fixednumMain .numkey ul li.othernum {
        background-color: #D1D5DA;
        line-height: 50px;
    }

    .fixednumMain .numkey ul li div {
        color: #000;
    }

    .fixednumMain .numkey ul li span {
        position: relative;
        font-size: 12px;
        top: -18px;
        color: #000;
    }
</style>

<script type="text/javascript">
    var focusEditTxt;

    //格式化数字
    function number_format(n) {
        var ns = n.toString();
        var mm = ns.match(/\d{1,3}(?=(\d{3})+$)/g);
        if (mm == null) return ns;
        mm.push(ns.replace(mm.join(""), ""));
        return mm.join(",");
    }

    function showFixednum_view(txt, fixedPrice, increase, bidMoney, bidbzj) {
        maskIsHide = false;
                    if (txt.length > 16) {
                $(".tipBanner .title").css("font-size", "12px");
            } else {
                $(".tipBanner .title").css("font-size", "16px");
            }
            $(".tipBanner .title").html(txt);
                $(".fixednumMask").show().animate({
            opacity: 0.382
        }, 100);

        $(".fixednumMain").show().animate({
            bottom: '0px'
        }, 100, 'ease-in-out');
    }

    function hideFixednum_view() {
        maskIsHide = true;
        $(".fixednumMain .tips").html('');
        $(".fixednumMain").animate({
            bottom: '-400px'
        }, 150, function () {
            $(".fixednumMain, .fixednumMask").hide();
        });
    }


    $(function () {
        $(document).on('fixednum_view:focus', function (e, editObj) {
            focusEditTxt = $(editObj);
        });

        $(document).on('fixednum_view:hide', function (e) {
            hideFixednum_view();
        });

        $(document).on('fixednum_view:show', function (e, txt, fixedPrice, increase, bidMoney, bidbzj) {
            //showFixednum_view(txt, fixedPrice, increase, bidMoney, bidbzj);
        });

        
        $(".fixednumMain").on("click", function (e) {
            e.preventDefault();
        });

        $(".fixednumMain .agreeBanner span").on("touchend", function () {
            if($(this).attr("url")) {
                window.location.href = $(this).attr("url");
            }
        });

        $(".fixednumMain .close, .tipBanner .finish, .fixednumMask").on("click", function (e) {
            e.preventDefault();
            if($(this).hasClass("finish")) {
                if (typeof fixednum_extend != 'undefined') {
                    if (typeof fixednum_extend.finish == 'function') {
                        if(!fixednum_extend.finish()) {
                            return;
                        }
                    }
                }
            } else {
                if (typeof fixednum_extend != 'undefined') {
                    if (typeof fixednum_extend.cancel == 'function') {
                        if(!fixednum_extend.cancel()) {
                            return;
                        }
                    }
                }
            }
            hideFixednum_view();
        });

        $(".fixednumMain .numkey ul li").on("touchstart", function () {
            if ($(this).html() == '00' || $(this).html() == '' || $(this).html() == '.') {
                $(this).css({"background-color": "#FFF"});
            } else {
                $(this).css({"background-color": "#D1D5DA"});
            }
        });

        $(".fixednumMain .numkey ul li.num").on("touchend", function () {
            var clickNum = $(this).find("div").html();
            if (clickNum == null) {
                clickNum = $(this).html();
            }

            var content = focusEditTxt.find('span').html() + clickNum;
            if(typeof fixednum_extend != 'undefined'){
                if(typeof fixednum_extend.tip == 'function'){
                    $(".fixednumMain .tips").html(fixednum_extend.tip(content));
                }

                if(typeof fixednum_extend.format == 'function'){
                    content = fixednum_extend.format(content);
                }
            }
            focusEditTxt.find('span').html(content);

            if (clickNum.length == 1 && clickNum != ".") {
                $(this).css({"background-color": "#FFF"});
            } else {
                $(this).css({"background-color": "#D1D5DA"});
            }
        });

        $(".fixednumMain .numkey ul li.delete").on("touchend", function () {
            var content = focusEditTxt.find('span').html();
            var content = content.substr(0, content.length - 1);

            if(typeof fixednum_extend != 'undefined'){
                //tip函数直接返回需要显示的描述，无描述需返回''
                if(typeof fixednum_extend.tip == 'function'){
                    $(".fixednumMain .tips").html(fixednum_extend.tip(content));
                }

                if(typeof fixednum_extend.format == 'function'){
                    content = fixednum_extend.format(content);
                }
            }
            focusEditTxt.find('span').html(content);

            $(this).css({"background-color": "#D1D5DA"});
        });
            });
</script>



<style type="text/css">
    .loadNextPage {
        width: 100%;
        height: 40px;
        visibility: visible;
    }

    .loadNextPage .loading {
        width: 110px;
        height: 40px;
        line-height: 40px;
        margin: 0 auto;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/loadingData.gif);
        background-size: auto 70%;
        background-repeat: no-repeat;
        background-position: left center;
        text-align: center;
        text-indent: 15px;
    }

    .wptMask {
        position: fixed;
        height: 100%;
        opacity: 0;
        top: 0px;
        bottom: 0px;
        width: 100%;
        background-color: #000;
        z-index: 1999;
    }

    .wptShare,
    .wptAlert,
    .wptConfirm,
    .wptMultiConfirm,
    .wptLoading {
        display: none;
    }

    .wptShare .shareTip {
        position: fixed;
        width: 96%;
        height: 286px;
        magin: 0 2%;
        top: 0px;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/share.png);
        background-repeat: no-repeat;
        background-position: right top;
        background-size: auto 55%;
        z-index: 9999;
    }

    .wptAlert .dialog,
    .wptConfirm .dialog,
    .wptMultiConfirm .dialog {
        position: fixed;
        background: #ededed;
        width: 100%;
        bottom: -180px;
        z-index: 1999;
    }

    .wptAlert .dialog .tip,
    .wptConfirm .dialog .tip,
    .wptMultiConfirm .dialog .tip {
        line-height: 30px;
        padding: 10px 0px;
        font-size: 14px;
        border-radius: 8px;
    }

    .wptMultiConfirm .dialog .tip {
        padding: 0px 20px;
        font-size: 16px;
        text-align: center;
        line-height: 50px;
    }

    .wptAlert .dialog .tip .msg,
    .wptConfirm .dialog .tip .msg {
        text-align: center;
        line-height: 30px;
    }

    .wptAlert .dialog .tip .msg.font18,
    .wptConfirm .dialog .tip .msg.font18 {
        font-size: 18px;
    }

    .wptAlert .dialog .tip .msg.faq,
    .wptConfirm .dialog .tip .msg.faq {
        font-size: 17px;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/faq.png);
        background-repeat: no-repeat;
        background-position: 10px center;
        background-size: auto 100%;
        line-height: 30px;
        height: 60px;
        text-align: left;
        padding-left: 80px;
        padding-right: 12px;
    }

    .wptAlert .dialog .tip .msg.smallFaq,
    .wptConfirm .dialog .tip .msg.smallFaq {
        font-size: 18px;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/faq.png);
        background-repeat: no-repeat;
        background-position: 10px center;
        background-size: auto 100%;
        line-height: 40px;
        height: 40px;
        text-align: left;
        padding-left: 60px;
        padding-right: 12px;
    }

    .wptAlert .btns,
    .wptConfirm .btns {
        width: 87%;
        margin: 0 auto;
        padding: 15px 0px;
    }

    .wptAlert .btns .btn-confirm,
    .wptAlert .btns .btn-cancel,
    .wptConfirm .btns .btn-confirm,
    .wptConfirm .btns .btn-cancel {
        border: 1px solid #ceced1;
        background: #f7f7f7;
        padding: 10px 14px;
        color: #454545;
        border-radius: 4px;
        width: 92%;
        text-align: center;
        font-size: 18px;
    }

    .wptAlert .btns .btn-green,
    .wptConfirm .btns .btn-green {
        background-color: #06BE04;
        color: #fff;
        border: none;
    }

    .wptAlert .btns .btn-cancel,
    .wptConfirm .btns .btn-cancel {
        background-color: #858c96;
        margin: 22px 0 7px 0;
        color: #fff;
        border: none;
    }

    .wptAlert .btns .btn-delete,
    .wptConfirm .btns .btn-delete {
        background-color: #e95757;
        color: #fff;
        border: none;
    }

    .wptMultiConfirm .btns {
        width: 100%;
        background-color: #D4D4DC;
    }

    .wptMultiConfirm .btns .btn-confirm,
    .wptMultiConfirm .btns .btn-cancel {
        height: 49px;
        line-height: 49px;
        margin-top: 1px;
        text-align: center;
        font-size: 18px;
        background-color: #F3F3F3;
    }

    .wptMultiConfirm .btns .btn-cancel{
        margin-top: 8px;
    }

    .wptPassword {
        position: fixed;
        width: 100%;
        top: 0px;
        bottom: 0px;
        background-color: #efeff4;
        display: none;
    }

    .wptPassword .dialog {
        width: 90%;
        margin: 80px auto 0 auto;
        height: 100px;
    }

    .wptPassword .dialog .tip {
        width: 100%;
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-size: 16px;
    }

    .wptPassword .dialog .password {
        width: 293px;
        margin: 10px auto 0 auto;
        height: 48px;
        border: 1px solid #c4c4c4;
    }

    .wptPassword .dialog .password .passwordKey {
        float: left;
        width: 48px;
        border-right: 1px solid #c4c4c4;
        height: 48px;
        line-height: 48px;
        background-color: #FFF;
        text-align: center;
        font-size: 20px;
    }

    .wptPassword .dialog .password .passwordKey:last-child {
        border-right: none;
    }

    .wptPassword .dialog .password .passwordKey .point {
        width: 48px;
        height: 48px;
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/passwordPoint.png);
        background-position: center;
        background-size: 10px;
        background-repeat: no-repeat;
    }

    .wptPassword .keyboard {
        position: absolute;
        width: 100%;
        background-color: #FFF;
        display: table;
        bottom: 0px;
    }

    .wptPassword .keyboard ul {
        padding: 0;
        margin: 0;
    }

    .wptPassword .keyboard ul,
    .wptPassword .keyboard li {
        text-decoration: none;
        list-style: none;
        vertical-align: middle;
    }

    .wptPassword .keyboard ul li {
        width: 33.1%;
        border-bottom: 1px solid #d2d5d8;
        border-right: 1px solid #d2d5d8;
        height: 50px;
        line-height: 50px;
        float: left;
        font-size: 28px;
        font-family: "Helvetica neue", Verdana, Geneva, sans-serif;
        text-align: center;
        background-color: #FFF;
        color: #000;
    }

    .wptPassword .keyboard ul li:nth-child(3n) {
        border-right: none;
    }

    .wptPassword .keyboard ul li.delete {
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/backspace.png);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 30px;
        background-color: #efeff4;
    }

    .wptPassword .keyboard ul li.blank {
        background-color: #efeff4;
        font-size: 17px;
    }

    .wptLoading {
        position: fixed;
        top: 0px;
        bottom: 0px;
        width: 100%;
        z-index: 1999;
    }

    .wptLoading .loading{
        position: absolute;
        left: 50%;
        top: 50%;
        width: 200px;
        height: 80px;
        margin-top: -40px;
        margin-left: -100px;
        background-color: rgba(0,0,0,0.7);
        background-image: url(<?php echo TEMPLATE_SITE_URL;?>/images/handling.gif);
        background-position: center;
        background-repeat: no-repeat;
        background-size: 100%;
        border-radius: 2px;
        font-size: 14px;
        color: #FFF;
        opacity: 0;
        line-height: 80px;
        text-align: center;
        text-indent: 15px;
        z-index: 9999;
    }

    .wptLoading .loading .process {
        position: absolute;
        width: 100%;
        height: 20px;
        bottom: 5px;
        color: #FFF;
        line-height: 20px;
        font-size: 12px;
        text-align: center;
        text-indent: 0px;
    }

    .wptNotice {
        position: fixed;
        bottom: 50px;
        width: 94%;
        background-color: rgba(0,0,0,0.7);
        height: 30px;
        padding: 8px 3%;
        color: #FFF;
        font-size: 14px;
        display: none;
    }

    .wptNotice .msg {
        float: left;
        width: 80%;
        height: 30px;
        line-height: 30px;
        overflow: hidden;
    }

    .wptNotice .msg img {
        width: 45px;
        height: 45px;
        border-radius: 6px;
        position: absolute;
        bottom: 10px;
    }

    .wptNotice .msg span {
        margin-left: 55px;
    }

    .wptNotice .btn {
        float: left;
        width: 20%;
        height: 28px;
        line-height: 28px;
        margin: 1px 0;
        background-color: #C7160A;
        border-radius: 2px;
        text-align: center;
        font-size: 12px;
    }
</style>

<script type="text/javascript">
    //关注快乐拍宝
    var isSubscribe = 1;
    var hasTelephone = 18622423701;
    if(hasTelephone == 0 && window.location.hash == "#hasTelephone") {
        hasTelephone = 1;
    }
    var sellerLevel = 1;
    var buyerLevel = 1;

    //每页数量
    var PAGE_NUM = 5;
    var maskIsHide = true;
    var pushState = null;

    //cookie
    function setCookie(name, value, expiredays) {
        var exdate = new Date();
        exdate.setDate(exdate.getDate() + expiredays);
        document.cookie = name + "=" + encodeURIComponent(value) +
        ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
    }

    function getCookie(name) {
        if (document.cookie.length > 0) {
            var start = document.cookie.indexOf(name + "=");
            if (start != -1) {
                start = start + name.length + 1;
                end = document.cookie.indexOf(";", start);
                if (end == -1) end = document.cookie.length;
                return decodeURIComponent(document.cookie.substring(start, end));
            }
        }
        return "";
    }
    
    // 获取手机型号
    var ignorePhoneModel = ['sm-g9200', 'sm-g9208'];
    function getPhoneModel() {
        var UA = navigator.userAgent;
        var model = '';
        try {
            var _model = UA.match(/;\s?([^;]+)\s?Build/i);
            if(_model) {
                _model = _model[1];
                model = _model.trim();
            }
        } catch (e) {
        }
        return model.toLowerCase();
    }

    window.onpopstate = function (event) {
        if ($.os.android && ignorePhoneModel.indexOf(getPhoneModel()) == -1) {
            if (pushState && pushState.backevent) {
                $(document.body).trigger(pushState.backevent);
            }
            pushState = event.state;
        }
    };

    function pushStateEvent(e) {
        if ($.os.android && ignorePhoneModel.indexOf(getPhoneModel()) == -1) {
            if (pushState == null) {
                pushState = {backevent: e};
                history.pushState(pushState, document.title, "?backevent=" + pushState.backevent.replace(/#/g, ""));
            }
        }
    }

    function replaceStateUrl(url) {
        history.replaceState({url:url}, document.title, url);
    }

    //阻止touchmove事件
    $('body').on('touchmove', function (e) {
        if (!maskIsHide) e.preventDefault();
    });

    //微信版本升级提醒
    function noticeWeChatVer(){
        var weChatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i) ;

        if( !weChatInfo || weChatInfo[1] < "6.0.2" ) {
            wptAlert("您的微信版本太老了，不能发布拍品，请升级至6.1以上版本！");
            return true;
        }
        return false;
    }

    //微信关注
    function wptSubscribe(url, msg) {
        $(document).off('wptConfirm_view:sure').one('wptConfirm_view:sure', function () {
            location.href = '/wpt/goToSubscribe?url=' + encodeURIComponent(url);
        });
        var confirmMsg = "亲，关注我们才能出价！";
        if(typeof msg != "undefined") {
            confirmMsg = msg;
        }
        wptConfirm(confirmMsg, {text:'关注快乐拍宝', msgClass: 'smallFaq'});
    }

    //电话号码
    function wptTelephone(msg) {
        $(document).off('wptConfirm_view:sure').one('wptConfirm_view:sure', function () {
            wptLoading('填写联系电话', function () {
                location.href = '/my/edit_userinfo/telephone?refer=' + encodeURIComponent(location.href)
            });
        });
        var confirmMsg = "亲，请填写您的联系电话！";
        if(typeof msg != "undefined") {
            confirmMsg = msg;
        }
        wptConfirm(confirmMsg, {text: '填写联系电话', msgClass: 'smallFaq'});
    }

    //微信分享
    function wptShare() {
        maskIsHide = false;
        $(".wptShare").show();
        $(".wptShare .wptMask").animate({opacity: "0.7"}, 100);

        $(document).off("wptShare_view:hide").one("wptShare_view:hide", function (e) {
            maskIsHide = true;
            $('.wptShare').hide();
            $(".wptShare .wptMask").css("opacity", "0");
        });

        $('.wptShare').off('touchend').one('touchend', function (e) {
            e.preventDefault();
            $(document.body).trigger("wptShare_view:hide");
        });
    }

    //alert
    function wptAlert(msg, callback, onlyBtnClose) {
        maskIsHide = false;

        $(".wptAlert .tip .msg").html(msg);

        $(".wptAlert").show();
        $(".wptMask").animate({opacity: "0.4"}, 100);
        $(".wptAlert .dialog").animate({bottom: "0px"}, 100);

        pushStateEvent('wptAlert_view:hide');
        $(document).off("wptAlert_view:hide").one("wptAlert_view:hide", function (e) {
            maskIsHide = true;
            $(".wptAlert .wptMask").animate({opacity: "0"}, 100);
            var height = '-' + $(".wptAlert .dialog").height() + 'px';
            $(".wptAlert .dialog").animate({bottom: height}, 100, function () {
                $(".wptAlert").hide();
            });
            if (typeof(callback) == 'function') setTimeout(callback, 0);
        });

        var closeObj = $('.wptAlert .wptMask, .wptAlert .btn-confirm');
        if(typeof onlyBtnClose != "undefined" && onlyBtnClose == true) {
            closeObj = $('.wptAlert .btn-confirm');
        }
        closeObj.off('touchend').one('touchend', function (e) {
            e.preventDefault();
            if ($.os.android && pushState && pushState.backevent && pushState.backevent == "wptAlert_view:hide") {
                history.back();
            } else {
                $(document.body).trigger("wptAlert_view:hide");
            }
        });
    }

    //confirm
    function wptConfirm(msg, sureObj) {
        maskIsHide = false;
        $('.wptConfirm .tip .msg').html(msg);

        if(typeof sureObj != "undefined") {
            //确定按钮上的文字
            sureObj.text && $('.wptConfirm .btns .sure').text(sureObj.text);
            //确定按钮的class
            sureObj.class && $('.wptConfirm .btns .sure').addClass(sureObj.class);
            //描述文本class
            sureObj.msgClass && $('.wptConfirm .tip .msg').addClass(sureObj.msgClass);
        }

        $(".wptConfirm").show();
        $(".wptConfirm .wptMask").animate({opacity: "0.4"}, 100);
        $(".wptConfirm .dialog").animate({bottom: "0px"}, 100);

        pushStateEvent("wptConfirm_view:hide");
        $(document).off("wptConfirm_view:hide").one("wptConfirm_view:hide", function (e) {
            maskIsHide = true;
            $(".wptConfirm .wptMask").animate({opacity: "0"}, 100);
            var height = '-' + $(".wptConfirm .dialog").height() + 'px';
            $(".wptConfirm .dialog").animate({bottom: height}, 100, function () {
                $(".wptConfirm").hide();
            });
        });

        $('.wptConfirm .wptMask, .wptConfirm .btn-cancel, .wptConfirm .btn-confirm').off('touchend').one('touchend', function (e) {
            e.preventDefault();
            if ($(e.target).hasClass('sure')) {
                $(document.body).trigger('wptConfirm_view:sure');
            }

            if ($.os.android && pushState && pushState.backevent && pushState.backevent == "wptConfirm_view:hide") {
                setTimeout(function() {
                    history.back();
                }, 0);
            } else {
                $(document.body).trigger("wptConfirm_view:hide");
            }
        });
    }

    //multiConfirm
    function wptMultiConfirm(msg, sureObj, cancelObj) {
        maskIsHide = false;
        $('.wptMultiConfirm .tip .msg').html(msg);

        if(typeof cancelObj != "undefined" && typeof cancelObj.text != "undefined") {
            $(".wptMultiConfirm .btns .btn-cancel").html(cancelObj.text);
        }

        if(typeof sureObj != "undefined") {
            $(".wptMultiConfirm .btns .btn-cancel").before(sureObj);
        }

        $(".wptMultiConfirm").show();
        $(".wptMultiConfirm .wptMask").animate({opacity: "0.4"}, 100);
        $(".wptMultiConfirm .dialog").animate({bottom: "0px"}, 100);

        pushStateEvent("wptMultiConfirm_view:hide");
        $(document).off("wptMultiConfirm_view:hide").one("wptMultiConfirm_view:hide", function (e) {
            maskIsHide = true;
            $(".wptMultiConfirm .wptMask").animate({opacity: "0"}, 100);
            var height = '-' + $(".wptMultiConfirm .dialog").height() + 'px';
            $(".wptMultiConfirm .dialog").animate({bottom: height}, 100, function () {
                $(".wptMultiConfirm").hide();
                $(".wptMultiConfirm").find(sureObj).remove();
            });
        });

        $('.wptMultiConfirm').off('touchend').one('touchend', '.wptMask, .btn-cancel, .btn-confirm', function (e) {
            e.preventDefault();
            if($(e.target).hasClass('btn-cancel')) {
                if (typeof cancelObj != "undefined" && typeof cancelObj.cb == "function") {
                    cancelObj.cb();
                }
            }
            if ($.os.android && pushState && pushState.backevent && pushState.backevent == "wptMultiConfirm_view:hide") {
                setTimeout(function() {
                    history.back();
                }, 0);
            } else {
                $(document.body).trigger("wptMultiConfirm_view:hide");
            }
        });
    }

    //trade password
    function wptPassword(msg, successFn, cancelFn, notCheck) {
        if(typeof msg != "undefined") {
            $(".wptPassword .tip").html(msg);
        }
        var passwordKeyIndex = 0;
        $(".wptPassword .password .passwordKey").attr("num", "").html("");


        $(".wptPassword .keyboard li").on("touchstart", function () {
            if ($(this).html() == '00' || $(this).html() == '' || $(this).html() == '.') {
                $(this).css({"background-color": "#FFF"});
            } else {
                $(this).css({"background-color": "#D1D5DA"});
            }
        });

        $(".wptPassword .num").off("touchend").on("touchend", function(e){
            e.preventDefault();
            e.stopPropagation();
            if(passwordKeyIndex < 6) {
                $(".wptPassword .password .passwordKey").eq(passwordKeyIndex).attr("num", $(this).html()).html('<div class="point"></div>');
                passwordKeyIndex++;
                if(passwordKeyIndex == 6) {
                    var password = "";
                    $(".wptPassword .password .passwordKey").each(function(i,n){
                        password += $(n).attr("num");
                    });

                    setTimeout(function(){
                        if(typeof notCheck != "undefined" && notCheck == true) {
                            successFn(password);
                        } else {
                            $.post("/balance/checkPassword", {'password': password}, function (res) {
                                res = JSON.parse(res);
                                if (res.errcode == 0) {
                                    successFn(password);
                                } else {
                                    wptAlert(res.errmsg, function () {
                                        passwordKeyIndex = 0;
                                        $(".wptPassword .password .passwordKey").attr("num", "").html("");
                                    }, true);
                                }
                            });
                        }
                    }, 150);
                }
            }

            if ($(this).html().length == 1 && $(this).html() != ".") {
                $(this).css({"background-color": "#FFF"});
            } else {
                $(this).css({"background-color": "#D1D5DA"});
            }
        });

        $(".wptPassword .delete").off("touchend").on("touchend", function() {
            if(passwordKeyIndex > 0) {
                passwordKeyIndex--;
                $(".wptPassword .password .passwordKey").eq(passwordKeyIndex).attr("num", "").html("");
            }
            $(this).css({"background-color": "#D1D5DA"});
        });

        $(".wptPassword .blank").off("touchend").one("touchend", function() {
            if ($.os.android && pushState && pushState.backevent && pushState.backevent == "wptPassword_view:hide") {
                setTimeout(function() {
                    history.back();
                }, 0);
            } else {
                $(document.body).trigger("wptPassword_view:hide");
            }
        });

        pushStateEvent('wptPassword_view:hide');
        $(document).off("wptPassword_view:hide").one("wptPassword_view:hide", function (e) {
            passwordKeyIndex = 0;
            $(".wptPassword .password .passwordKey").attr("num", "").html("");
            $(".wptPassword").hide();

            if(typeof cancelFn == 'function') {
                setTimeout(function(){
                    cancelFn();
                }, 600);
            }
        });

        $(".wptPassword").show();
    }

    //notice
    function wptNotice(msg, btnMsg, callback, time) {
        time = typeof time == "undefined" ? 8000 : time;
        $(".wptNotice .msg span").html(msg);
        $(".wptNotice .btn").html(btnMsg);

        var noticeBottom = "0px";
        if($(".mainMenu").length) {
            noticeBottom = $(".mainMenu").height() + "px";
        }
        $(".wptNotice").css("bottom", noticeBottom).show();

        $(".wptNotice .btn").off("click").one("click", function(){
            $(document.body).trigger('wptNotice_view:hide');
            if (typeof(callback) == 'function') callback();
        });

        $(document).off("wptNotice_view:hide").one("wptNotice_view:hide", function () {
            $(".wptNotice").animate({opacity: "0"}, 500);
            setTimeout(function(){
                $(".wptNotice").hide();
                $(".wptNotice").css("opacity", 1);
            }, 700);
        });

        $(document).off("wptNotice_view:bottom").on("wptNotice_view:bottom", function (e, bottom) {
            $(".wptNotice").animate({bottom: bottom}, 60);
        });

        setTimeout(function() {
            $(document.body).trigger('wptNotice_view:hide');
        }, time);
    }

    //loading
    function wptLoading(msg, callback, time) {
        time = typeof time == "undefined" ? 1000 : time;
        maskIsHide = false;
        $(".wptLoading .loading").html(msg);

        $(".wptLoading").show();
        $(".wptLoading .loading").animate({opacity: 1}, time, function(){
            if (typeof(callback) == 'function') callback();
        });

        $(document).off("wptLoading_view:hide").one("wptLoading_view:hide", function (e) {
            maskIsHide = true;
            $(".wptLoading .loading").css({opacity: 0});
            $(".wptLoading").hide();
        });

        $(document).off("wptLoading_view:msg").on("wptLoading_view:msg", function (e, msg) {
            $(".wptLoading .loading").html(msg);
        });
    }
</script>


<div class="wptNotice">
    <div class="msg"><img src="<?php echo TEMPLATE_SITE_URL;?>/images/logo256.jpg"><span></span></div>
    <div class="btn">关 闭</div>
</div>

<div class="wptLoading">
    <div class="wptMask"></div>
    <div class="loading"></div>
</div>

</body>
</html>